import request from '@/utils/request'

// 查询系统树形字典列表
export function listTree_dict(query) {
  return request({
    url: '/test/tree_dict/list',
    method: 'get',
    params: query
  })
}

// 查询系统树形字典详细
export function getTree_dict(dictId) {
  return request({
    url: '/test/tree_dict/' + dictId,
    method: 'get'
  })
}

// 新增系统树形字典
export function addTree_dict(data) {
  return request({
    url: '/test/tree_dict',
    method: 'post',
    data: data
  })
}

// 修改系统树形字典
export function updateTree_dict(data) {
  return request({
    url: '/test/tree_dict',
    method: 'put',
    data: data
  })
}

// 删除系统树形字典
export function delTree_dict(dictId) {
  return request({
    url: '/test/tree_dict/' + dictId,
    method: 'delete'
  })
}

// 获取树形结构数据
export function treeDictTree(query) {
  return request({
    url: '/test/tree_dict/tree',
    method: 'get',
    params: query
  })
}
